<%--
  Created by IntelliJ IDEA.
  User: longhunpomie
  Date: 2023/1/17
  Time: 15:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <title>分类</title>
    <%
        String basePath = request.getScheme() + "://" +
                request.getServerName() +
                ":" + request.getServerPort() +
                request.getContextPath() + "/";
        pageContext.setAttribute("basePath", basePath);
    %>
    <link rel="shortcut icon" href="../../static/img/logo_chzu1.png" type="image/x-icon" />
<%--    <link rel="shortcut icon" href="static/img/logo_chzu1.png" type="image/x-icon" />--%>
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/2.3.1/css/bootstrap.min.css">

    <!-- Latest compiled and minified JavaScript -->
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
    <jsp:include page="../../pages/common/indexScript.jsp"></jsp:include>
</head>
<body>
<div class="navbar">
    <div class="navbar-inner">
        <div class="container-fluid">
            <a data-target=".navbar-responsive-collapse" data-toggle="collapse" class="btn btn-navbar"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a> <a href="${basePath}" class="brand" style="color: green">滁州学院博客</a>
            <div class="nav-collapse collapse navbar-responsive-collapse">
                <ul class="nav">
                    <li>
                        <a href="${basePath}">主页</a>
                    </li>
                    <li class="active">
                        <a href="${basePath}/tag/toClassification">分类</a>
                    </li>
                    <li >
                        <a href="${basePath}/ranklist/toRankList">排行榜</a>
                    </li>
                    <li>
                        <a href="${basePath}/user/toDynamic">动态</a>
                    </li>
                </ul>
                <ul class="nav pull-right">
                    <li>
                        <form class="form-search" action="${basePath}/blog/queryBlog">
                            <input class="input-medium search-query" type="text" name="blogName" placeholder="标题，作者，内容"/> <button type="submit" class="btn">查找</button>
                        </form>
                    </li>
                    <li>
                        <a onclick="B()">关于</a>
                    </li>
                    <li class="divider-vertical">
                    </li>
                    <li class="dropdown">
                        <c:if test="${not empty sessionScope.user}">
                            <a data-toggle="dropdown" class="dropdown-toggle">
                                <c:if test="${not empty sessionScope.user.headImg}">
                                    <img onclick="A()" src="${basePath}user/img?name=${sessionScope.user.name}" style="width: 50px;height:50px;border-radius: 50%;" alt="">
                                </c:if>
                                <c:if test="${empty sessionScope.user.headImg}">
                                    <img onclick="A()" src="../../static/img/defaultHeadImg3.png" style="width: 50px;height:50px;border-radius: 50%;" alt="">
                                </c:if>
                                    ${sessionScope.user.name}
                                <strong class="caret"></strong></a>
                        </c:if>
                        <c:if test="${empty sessionScope.user}">
                            <a data-toggle="dropdown" class="dropdown-toggle">登录和注册<strong class="caret"></strong></a>
                        </c:if>
                        <ul class="dropdown-menu">
                            <c:if test="${empty sessionScope.user}">
                                <li>
                                    <a href="${basePath}/user/toRegist">注册</a>
                                </li>
                                <li>
                                    <a href="${basePath}/user/toLogin">登录</a>
                                </li>
                            </c:if>
                            <c:if test="${not empty sessionScope.user}">
                                <li>
                                    <a href="${basePath}/user/toUpdateUserInfo">修改信息</a>
                                </li>
                                <li>
                                    <a href="${basePath}/blog/showMyBlog?userId=${sessionScope.user.id}">我的空间</a>
                                </li>
                                <li class="divider">
                                </li>
                                <li>
                                    <a href="${basePath}/blog/toCollection?userId=${sessionScope.user.id}">我的收藏</a>
                                </li>
                                <li>
                                    <a href="${basePath}/blog/toHistory?userId=${sessionScope.user.id}">历史记录</a>
                                </li>
                                <li>
                                    <a href="${basePath}/blog/toAddBlog?name=${sessionScope.user.name}">去写博客</a>
                                </li>
                                <li class="divider">
                                </li>
                                <li>
                                    <a href="${basePath}/user/logout">注销</a>
                                </li>
                            </c:if>
                        </ul>
                    </li>
                </ul>
            </div>

        </div>
    </div>
</div>
<jsp:include page="../../pages/common/remind.jsp"></jsp:include>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="accordion" id="accordion-965599">
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion-965599" href="#accordion-element-16510">一级标签</a>
                    </div>
                    <div id="accordion-element-16510" class="accordion-body collapse">
                        <div class="accordion-inner">
                            <span class="label badge-success"><a style="color:white;" href="${basePath}/tag/classification?Tag=算法">算法</a></span>
                            <span class="label badge-info"><a style="color:white;" href="${basePath}/tag/classification?Tag=java开发">java开发</a></span>
                            <span class="label badge-warning"><a style="color:white;" href="${basePath}/tag/classification?Tag=c#开发">c#开发</a></span>
                            <span class="label badge-important"><a style="color:white;" href="${basePath}/tag/classification?Tag=c语言基础">c语言基础</a></span>
                            <span class="label badge-inverse"><a style="color:white;" href="${basePath}/tag/classification?Tag=linux">linux</a></span>
                            <span class="label badge-success"><a style="color:white;" href="${basePath}/tag/classification?Tag=网络">网络</a></span>
                            <span class="label badge-warning"><a style="color:white;" href="${basePath}/tag/classification?Tag=mysql-oracle">mysql-oracle</a></span>
                            <span class="label badge-important"><a style="color:white;" href="${basePath}/tag/classification?Tag=C++">C++</a></span>
                            <span class="label badge-inverse"><a style="color:white;" href="${basePath}/tag/classification?Tag=生活">生活</a></span>
                            <span class="label badge-success"><a style="color:white;" href="${basePath}/tag/classification?Tag=python">python</a></span>
                            <span class="label badge-info"><a style="color:white;" href="${basePath}/tag/classification?Tag=Go">Go</a></span>
                        </div>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion-965599" href="#accordion-element-570028">二级标签</a>
                    </div>
                    <div id="accordion-element-570028" class="accordion-body collapse">
                        <div class="accordion-inner">
                            <span class="label badge-success"><a style="color:white;" href="${basePath}/tag/classification?Tag=二分">二分</a></span>
                            <span class="label badge-info"><a style="color:white;" href="${basePath}/tag/classification?Tag=线段树">线段树</a></span>
                            <span class="label badge-warning"><a style="color:white;" href="${basePath}/tag/classification?Tag=前缀和">前缀和</a></span>
                            <span class="label badge-important"><a style="color:white;" href="${basePath}/tag/classification?Tag=排序算法">排序算法</a></span>
                            <span class="label badge-inverse"><a style="color:white;" href="${basePath}/tag/classification?Tag=数学">数学</a></span>
                            <span class="label badge-success"><a style="color:white;" href="${basePath}/tag/classification?Tag=dp">dp</a></span>
                            <span class="label badge-info"><a style="color:white;" href="${basePath}/tag/classification?Tag=数据结构">数据结构</a></span>
                            <span class="label badge-warning"><a style="color:white;" href="${basePath}/tag/classification?Tag=JavaWeb">JavaWeb</a></span>
                            <span class="label badge-important"><a style="color:white;" href="${basePath}/tag/classification?Tag=Web框架">Web框架</a></span>
                            <span class="label badge-inverse"><a style="color:white;" href="${basePath}/tag/classification?Tag=分享">分享</a></span>
                            <span class="label badge-success"><a style="color:white;" href="${basePath}/tag/classification?Tag=安卓">安卓</a></span>
                            <span class="label badge-info"><a style="color:white;" href="${basePath}/tag/classification?Tag=游戏">游戏</a></span>
                            <span class="label badge-warning"><a style="color:white;" href="${basePath}/tag/classification?Tag=unity">unity</a></span>
                        </div>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion-965599" href="#accordion-element-570029">三级标签</a>
                    </div>
                    <div id="accordion-element-570029" class="accordion-body collapse">
                        <div class="accordion-inner">
                            <span class="label badge-success"><a style="color:white;" href="${basePath}/tag/classification?Tag=音乐">音乐</a></span>
                            <span class="label badge-info"><a style="color:white;" href="${basePath}/tag/classification?Tag=笔记">笔记</a></span>
                            <span class="label badge-warning"><a style="color:white;" href="${basePath}/tag/classification?Tag=杂谈">杂谈</a></span>
                        </div>
                    </div>
                </div>
            </div>
            <c:forEach var="blog" items="${requestScope.blogs}">
                <li class="span2" style="height: 500px; width: 175px;">
                    <div class="thumbnail">
                        <c:if test="${blog.value.value.key.headImg != null}">
                            <img src="${basePath}user/img?name=${blog.key.userName}" style="width: 250px; height: 180px;border-radius: 50%;"/>
                        </c:if>
                        <c:if test="${blog.value.value.key.headImg == null}">
                            <img src="../../static/img/defaultHeadImg3.png" style="width: 250px; height: 180px;border-radius: 50%;" alt=""/>
                        </c:if>
                        <div class="caption" >
                            <h4 style="color: blue">
                                    ${blog.key.userName}
                            </h4>
                            <span style="color: grey">${blog.value.key}</span>
                            <span style="color:darkolivegreen;">&nbsp;&nbsp;浏览数:<font style="color: red">${blog.key.browsesNum}</font></span>
                            <h3>
                                    ${blog.key.blogHead}
                            </h3>
                            <p style="display: -webkit-box;   overflow: hidden;   white-space: normal!important;   text-overflow: ellipsis;   word-wrap: break-word;   -webkit-line-clamp: 5;   -webkit-box-orient: vertical;">
                                    ${blog.key.blogContent}
                            </p>
                            <p>
                                <a class="btn btn-primary" href="${basePath}/blog/showBlog?id=${blog.key.id}">浏览</a> <img src="../../static/img/CommentImg.png">${blog.value.value.value}</img><img src="../../static/img/like.png" style="width: 35px; height: 35px">${blog.key.likes}</img>
                            </p>
                        </div>
                    </div>
                </li>
            </c:forEach>
        </div>
    </div>
</div>
<jsp:include page="../../pages/common/page_nav.jsp"></jsp:include>
<jsp:include page="../../pages/common/footer.jsp"></jsp:include>
</body>
</html>
